<template>
  <div class="modal-title-container">
    <div class="background-container"></div>
    <div class="modal-title-content">
      {{ title }}
    </div>
  </div>
</template>

<script>
export default {
  name: "ModalTitle",
  props: {
    title: {
      type: String,
      required: true
    }
  }
};
</script>

<style>
.modal-title-container {
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

.background-container {
  width: 100%;
  height: 100%;
  background-image: url('/img/border/header.png');
  background-repeat: no-repeat;
  /* background-size: contain; */
  /* background-size: 100% auto; 将高度设置为自动，宽度保持100% */
  background-size: 100% 100%;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
}

.modal-title-content {
  text-align: center;
  color: white;
  font-size: 14px;
  padding: 20px;
  position: relative;
  z-index: 1;
}
</style>